package fr.bludwarf.skywarrior.utils;

import static org.junit.Assert.assertEquals;

import org.junit.Test;

public class TimeUtilsTest {

	@Test
	public void testTimeToString() {
		assertEquals("00m 00s", TimeUtils.timeToString(0));
		assertEquals("00m 01s", TimeUtils.timeToString(1));
		assertEquals("00m 10s", TimeUtils.timeToString(10));
		assertEquals("00m 59s", TimeUtils.timeToString(59));
		assertEquals("01m 01s", TimeUtils.timeToString(60 + 1));
		assertEquals("1h 01m 01s", TimeUtils.timeToString(3600 + 60 + 1));
		assertEquals("10h 01m 01s", TimeUtils.timeToString(36000 + 60 + 1));
		assertEquals("1j 10h 01m 01s", TimeUtils.timeToString(24 * 3600 + 36000 + 60 + 1));
		assertEquals("10j 10h 01m 01s", TimeUtils.timeToString(240 * 3600 + 36000 + 60 + 1));
	}

}
